package test;

public class Java02_Object {
    public static void main(String[] args) {
        //TODO 面向对象
        Animal c = new Animal();
        c.type="猫";
        c.name="小橘";
        c.run();

        Animal d = new Animal();
        d.type="狗";
        d.name="大黑";
        d.run();

    }
}
class Animal{
    String type="动物";
    String name;
    String thing="见到我";
    void run(){
        System.out.println(type+":"+thing+name+"跑开了");

    }


}



















